/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufsc.aps.jogodavida.view;

import br.ufsc.aps.jogodavida.control.AtorJogador;
import br.ufsc.aps.jogodavida.model.Carta;
import br.ufsc.aps.jogodavida.model.Conjunto;
import br.ufsc.aps.jogodavida.model.Tabuleiro;
import br.ufsc.aps.jogodavida.model.TipoConjunto;
import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import javax.swing.JLabel;
import javax.swing.JOptionPane;

/**
 *
 * @author Daniel
 */
public class PanelTabuleiro extends javax.swing.JPanel implements JanelaListener {

    private AtorJogador atorJogador = null;
    private Frame base = null;
    
    public PanelTabuleiro(Frame base) {
        this.base = base;
        initComponents();
        this.atorJogador = base.getJogador();
        this.atorJogador.setTabuleiroPanel(this);
        panelCartasMao.setLayout(new FlowLayout());
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        a26 = new javax.swing.JLabel();
        a27 = new javax.swing.JLabel();
        a28 = new javax.swing.JLabel();
        a29 = new javax.swing.JLabel();
        a30 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        panelCartasMao = new javax.swing.JPanel();
        buttonPassarVez = new javax.swing.JButton();
        panelVida = new javax.swing.JPanel();
        labelAtividade = new javax.swing.JLabel();
        panelAtividade = new javax.swing.JPanel();
        panelAtividadeA = new javax.swing.JPanel();
        panelAtividadeB = new javax.swing.JPanel();
        panelAtividadeC = new javax.swing.JPanel();
        panelAtividadeD = new javax.swing.JPanel();
        panelSustentavel = new javax.swing.JPanel();
        panelSustentavelA = new javax.swing.JPanel();
        panelSustentavelB = new javax.swing.JPanel();
        panelSustentavelC = new javax.swing.JPanel();
        panelSustentavelD = new javax.swing.JPanel();
        labelAcao = new javax.swing.JLabel();
        panelFamilia = new javax.swing.JPanel();
        panelFamiliaA = new javax.swing.JPanel();
        panelFamiliaB = new javax.swing.JPanel();
        panelFamiliaC = new javax.swing.JPanel();
        panelFamiliaD = new javax.swing.JPanel();
        labelFamilia = new javax.swing.JLabel();
        panelProfissao = new javax.swing.JPanel();
        panelProfissaoA = new javax.swing.JPanel();
        panelProfissaoB = new javax.swing.JPanel();
        panelProfissaoC = new javax.swing.JPanel();
        panelProfissaoD = new javax.swing.JPanel();
        labelProfissao = new javax.swing.JLabel();
        buttonAtividade = new javax.swing.JButton();
        buttonSustentavel = new javax.swing.JButton();
        buttonFamilia = new javax.swing.JButton();
        buttonProfissao = new javax.swing.JButton();
        panelCartasAdversario = new javax.swing.JPanel();
        labelMaoAdFam = new javax.swing.JLabel();
        labelQuantMaoAdFamilia = new javax.swing.JLabel();
        labelCartasMaoAdLazer = new javax.swing.JLabel();
        labelQuantMaoAdLazer = new javax.swing.JLabel();
        labelCartasMaoAdSust = new javax.swing.JLabel();
        labelQuantMaoAdSustentavel = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        labelQuantMaoAdProfissao = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        cartasMaoAdLazer = new javax.swing.JLabel();
        cartasAdmaoSustentavel = new javax.swing.JLabel();
        cartasAdMaoFamilia = new javax.swing.JLabel();
        cartaAdMaoProfissao = new javax.swing.JLabel();
        labelA = new javax.swing.JLabel();
        labelB = new javax.swing.JLabel();
        labelC = new javax.swing.JLabel();
        labelD = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        totalCartasAdAtividadeA = new javax.swing.JLabel();
        totalCartasAdAtividadeB = new javax.swing.JLabel();
        totalCartasAdAtividadeC = new javax.swing.JLabel();
        totalCartasAdAtividadeD = new javax.swing.JLabel();
        totalPontuacaoAdAtividade = new javax.swing.JLabel();
        totalCartasAdSustentavelA = new javax.swing.JLabel();
        totalCartasAdSustentavelB = new javax.swing.JLabel();
        totalCartasAdSustentavelC = new javax.swing.JLabel();
        totalCartasAdSustentavelD = new javax.swing.JLabel();
        totalPontuacaoAdSustentavel = new javax.swing.JLabel();
        totalCartasAdFamiliaA = new javax.swing.JLabel();
        totalCartasAdFamiliaB = new javax.swing.JLabel();
        totalCartasAdFamiliaC = new javax.swing.JLabel();
        totalCartasAdFamiliaD = new javax.swing.JLabel();
        totalCartasAdProfissaoA = new javax.swing.JLabel();
        totalPontuacaoAdFamilia = new javax.swing.JLabel();
        totalCartasAdProfissaoB = new javax.swing.JLabel();
        totalCartasAdProfissaoC = new javax.swing.JLabel();
        totalCartasAdProfissaoD = new javax.swing.JLabel();
        totalPontuacaoAdProfissao = new javax.swing.JLabel();
        labelAguardando = new javax.swing.JLabel();
        labelStatus = new javax.swing.JLabel();

        a26.setText("a4");
        a26.setPreferredSize(new java.awt.Dimension(22, 22));

        a27.setText("a3");
        a27.setPreferredSize(new java.awt.Dimension(22, 22));

        a28.setText("a5");
        a28.setPreferredSize(new java.awt.Dimension(16, 16));

        a29.setText("a1");
        a29.setPreferredSize(new java.awt.Dimension(22, 22));

        a30.setText("a2");
        a30.setPreferredSize(new java.awt.Dimension(22, 22));

        jLabel1.setText("A");

        setMinimumSize(new java.awt.Dimension(800, 600));
        setPreferredSize(new java.awt.Dimension(950, 600));

        panelCartasMao.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Cartas na mão", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(153, 153, 153)));
        panelCartasMao.setName(""); // NOI18N
        panelCartasMao.setLayout(null);

        buttonPassarVez.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        buttonPassarVez.setText("Passar Vez");
        buttonPassarVez.setToolTipText("Clique para encerrar sua jogada");
        buttonPassarVez.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonPassarVezActionPerformed(evt);
            }
        });

        panelVida.setBackground(new java.awt.Color(255, 255, 255));

        labelAtividade.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        labelAtividade.setLabelFor(panelAtividade);
        labelAtividade.setText("Atividade & Lazer");

        panelAtividade.setBackground(new java.awt.Color(255, 204, 51));
        panelAtividade.setPreferredSize(new java.awt.Dimension(140, 140));

        javax.swing.GroupLayout panelAtividadeALayout = new javax.swing.GroupLayout(panelAtividadeA);
        panelAtividadeA.setLayout(panelAtividadeALayout);
        panelAtividadeALayout.setHorizontalGroup(
            panelAtividadeALayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        panelAtividadeALayout.setVerticalGroup(
            panelAtividadeALayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout panelAtividadeBLayout = new javax.swing.GroupLayout(panelAtividadeB);
        panelAtividadeB.setLayout(panelAtividadeBLayout);
        panelAtividadeBLayout.setHorizontalGroup(
            panelAtividadeBLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        panelAtividadeBLayout.setVerticalGroup(
            panelAtividadeBLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout panelAtividadeCLayout = new javax.swing.GroupLayout(panelAtividadeC);
        panelAtividadeC.setLayout(panelAtividadeCLayout);
        panelAtividadeCLayout.setHorizontalGroup(
            panelAtividadeCLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        panelAtividadeCLayout.setVerticalGroup(
            panelAtividadeCLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout panelAtividadeDLayout = new javax.swing.GroupLayout(panelAtividadeD);
        panelAtividadeD.setLayout(panelAtividadeDLayout);
        panelAtividadeDLayout.setHorizontalGroup(
            panelAtividadeDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        panelAtividadeDLayout.setVerticalGroup(
            panelAtividadeDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout panelAtividadeLayout = new javax.swing.GroupLayout(panelAtividade);
        panelAtividade.setLayout(panelAtividadeLayout);
        panelAtividadeLayout.setHorizontalGroup(
            panelAtividadeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelAtividadeA, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(panelAtividadeB, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(panelAtividadeC, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(panelAtividadeD, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        panelAtividadeLayout.setVerticalGroup(
            panelAtividadeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelAtividadeLayout.createSequentialGroup()
                .addComponent(panelAtividadeA, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelAtividadeB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelAtividadeC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelAtividadeD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 2, Short.MAX_VALUE))
        );

        panelSustentavel.setBackground(new java.awt.Color(0, 153, 255));
        panelSustentavel.setPreferredSize(new java.awt.Dimension(140, 140));

        javax.swing.GroupLayout panelSustentavelALayout = new javax.swing.GroupLayout(panelSustentavelA);
        panelSustentavelA.setLayout(panelSustentavelALayout);
        panelSustentavelALayout.setHorizontalGroup(
            panelSustentavelALayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 201, Short.MAX_VALUE)
        );
        panelSustentavelALayout.setVerticalGroup(
            panelSustentavelALayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout panelSustentavelBLayout = new javax.swing.GroupLayout(panelSustentavelB);
        panelSustentavelB.setLayout(panelSustentavelBLayout);
        panelSustentavelBLayout.setHorizontalGroup(
            panelSustentavelBLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        panelSustentavelBLayout.setVerticalGroup(
            panelSustentavelBLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout panelSustentavelCLayout = new javax.swing.GroupLayout(panelSustentavelC);
        panelSustentavelC.setLayout(panelSustentavelCLayout);
        panelSustentavelCLayout.setHorizontalGroup(
            panelSustentavelCLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        panelSustentavelCLayout.setVerticalGroup(
            panelSustentavelCLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout panelSustentavelDLayout = new javax.swing.GroupLayout(panelSustentavelD);
        panelSustentavelD.setLayout(panelSustentavelDLayout);
        panelSustentavelDLayout.setHorizontalGroup(
            panelSustentavelDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        panelSustentavelDLayout.setVerticalGroup(
            panelSustentavelDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout panelSustentavelLayout = new javax.swing.GroupLayout(panelSustentavel);
        panelSustentavel.setLayout(panelSustentavelLayout);
        panelSustentavelLayout.setHorizontalGroup(
            panelSustentavelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelSustentavelA, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(panelSustentavelB, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(panelSustentavelC, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(panelSustentavelD, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        panelSustentavelLayout.setVerticalGroup(
            panelSustentavelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelSustentavelLayout.createSequentialGroup()
                .addComponent(panelSustentavelA, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelSustentavelB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(panelSustentavelC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(panelSustentavelD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(70, 70, 70))
        );

        labelAcao.setText("Ações Sustentáveis");

        panelFamilia.setBackground(new java.awt.Color(153, 255, 204));
        panelFamilia.setMaximumSize(new java.awt.Dimension(140, 140));
        panelFamilia.setPreferredSize(new java.awt.Dimension(140, 140));

        javax.swing.GroupLayout panelFamiliaALayout = new javax.swing.GroupLayout(panelFamiliaA);
        panelFamiliaA.setLayout(panelFamiliaALayout);
        panelFamiliaALayout.setHorizontalGroup(
            panelFamiliaALayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 193, Short.MAX_VALUE)
        );
        panelFamiliaALayout.setVerticalGroup(
            panelFamiliaALayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout panelFamiliaBLayout = new javax.swing.GroupLayout(panelFamiliaB);
        panelFamiliaB.setLayout(panelFamiliaBLayout);
        panelFamiliaBLayout.setHorizontalGroup(
            panelFamiliaBLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        panelFamiliaBLayout.setVerticalGroup(
            panelFamiliaBLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout panelFamiliaCLayout = new javax.swing.GroupLayout(panelFamiliaC);
        panelFamiliaC.setLayout(panelFamiliaCLayout);
        panelFamiliaCLayout.setHorizontalGroup(
            panelFamiliaCLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        panelFamiliaCLayout.setVerticalGroup(
            panelFamiliaCLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout panelFamiliaDLayout = new javax.swing.GroupLayout(panelFamiliaD);
        panelFamiliaD.setLayout(panelFamiliaDLayout);
        panelFamiliaDLayout.setHorizontalGroup(
            panelFamiliaDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        panelFamiliaDLayout.setVerticalGroup(
            panelFamiliaDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout panelFamiliaLayout = new javax.swing.GroupLayout(panelFamilia);
        panelFamilia.setLayout(panelFamiliaLayout);
        panelFamiliaLayout.setHorizontalGroup(
            panelFamiliaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelFamiliaA, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(panelFamiliaB, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(panelFamiliaC, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(panelFamiliaD, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        panelFamiliaLayout.setVerticalGroup(
            panelFamiliaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelFamiliaLayout.createSequentialGroup()
                .addComponent(panelFamiliaA, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelFamiliaB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelFamiliaC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelFamiliaD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 2, Short.MAX_VALUE))
        );

        labelFamilia.setText("Cotidiano & Familia");

        panelProfissao.setBackground(new java.awt.Color(255, 51, 51));
        panelProfissao.setPreferredSize(new java.awt.Dimension(140, 140));

        javax.swing.GroupLayout panelProfissaoALayout = new javax.swing.GroupLayout(panelProfissaoA);
        panelProfissaoA.setLayout(panelProfissaoALayout);
        panelProfissaoALayout.setHorizontalGroup(
            panelProfissaoALayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        panelProfissaoALayout.setVerticalGroup(
            panelProfissaoALayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout panelProfissaoBLayout = new javax.swing.GroupLayout(panelProfissaoB);
        panelProfissaoB.setLayout(panelProfissaoBLayout);
        panelProfissaoBLayout.setHorizontalGroup(
            panelProfissaoBLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        panelProfissaoBLayout.setVerticalGroup(
            panelProfissaoBLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout panelProfissaoCLayout = new javax.swing.GroupLayout(panelProfissaoC);
        panelProfissaoC.setLayout(panelProfissaoCLayout);
        panelProfissaoCLayout.setHorizontalGroup(
            panelProfissaoCLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        panelProfissaoCLayout.setVerticalGroup(
            panelProfissaoCLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout panelProfissaoDLayout = new javax.swing.GroupLayout(panelProfissaoD);
        panelProfissaoD.setLayout(panelProfissaoDLayout);
        panelProfissaoDLayout.setHorizontalGroup(
            panelProfissaoDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        panelProfissaoDLayout.setVerticalGroup(
            panelProfissaoDLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout panelProfissaoLayout = new javax.swing.GroupLayout(panelProfissao);
        panelProfissao.setLayout(panelProfissaoLayout);
        panelProfissaoLayout.setHorizontalGroup(
            panelProfissaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelProfissaoA, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(panelProfissaoB, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(panelProfissaoC, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(panelProfissaoD, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        panelProfissaoLayout.setVerticalGroup(
            panelProfissaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelProfissaoLayout.createSequentialGroup()
                .addComponent(panelProfissaoA, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelProfissaoB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelProfissaoC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelProfissaoD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 2, Short.MAX_VALUE))
        );

        labelProfissao.setText("Profissão & Carreira");

        javax.swing.GroupLayout panelVidaLayout = new javax.swing.GroupLayout(panelVida);
        panelVida.setLayout(panelVidaLayout);
        panelVidaLayout.setHorizontalGroup(
            panelVidaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelVidaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelVidaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(labelAtividade)
                    .addComponent(labelFamilia)
                    .addComponent(panelFamilia, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE)
                    .addComponent(panelAtividade, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE))
                .addGap(72, 72, 72)
                .addGroup(panelVidaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(labelProfissao)
                    .addComponent(labelAcao)
                    .addComponent(panelSustentavel, javax.swing.GroupLayout.DEFAULT_SIZE, 201, Short.MAX_VALUE)
                    .addComponent(panelProfissao, javax.swing.GroupLayout.DEFAULT_SIZE, 201, Short.MAX_VALUE))
                .addContainerGap(14, Short.MAX_VALUE))
        );
        panelVidaLayout.setVerticalGroup(
            panelVidaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelVidaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelVidaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelAtividade)
                    .addComponent(labelAcao))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panelVidaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(panelSustentavel, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(panelVidaLayout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(panelAtividade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(panelVidaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelFamilia)
                    .addComponent(labelProfissao))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panelVidaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(panelFamilia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(panelProfissao, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(37, 37, 37))
        );

        buttonAtividade.setBackground(new java.awt.Color(255, 204, 51));
        buttonAtividade.setText("Atividade & Lazer");
        buttonAtividade.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonAtividadeActionPerformed(evt);
            }
        });

        buttonSustentavel.setBackground(new java.awt.Color(0, 153, 255));
        buttonSustentavel.setText("Ações Sustentáveis");
        buttonSustentavel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonSustentavelActionPerformed(evt);
            }
        });

        buttonFamilia.setBackground(new java.awt.Color(153, 255, 204));
        buttonFamilia.setText("Cotidiano & Familia");
        buttonFamilia.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonFamiliaActionPerformed(evt);
            }
        });

        buttonProfissao.setBackground(new java.awt.Color(255, 51, 51));
        buttonProfissao.setText("Profissão & Carreira");
        buttonProfissao.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonProfissaoActionPerformed(evt);
            }
        });

        panelCartasAdversario.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Cartas Adversário", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(153, 153, 153)));

        labelMaoAdFam.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        labelMaoAdFam.setText("Cotidiano & Familia:");

        labelQuantMaoAdFamilia.setText("0");

        labelCartasMaoAdLazer.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        labelCartasMaoAdLazer.setText("Atividade & Lazer:");

        labelQuantMaoAdLazer.setText("0");

        labelCartasMaoAdSust.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        labelCartasMaoAdSust.setText("Ações Sustentáveis:");

        labelQuantMaoAdSustentavel.setText("0");

        jLabel20.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel20.setText("Profissão & Carreira:");

        labelQuantMaoAdProfissao.setText("0");

        javax.swing.GroupLayout panelCartasAdversarioLayout = new javax.swing.GroupLayout(panelCartasAdversario);
        panelCartasAdversario.setLayout(panelCartasAdversarioLayout);
        panelCartasAdversarioLayout.setHorizontalGroup(
            panelCartasAdversarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelCartasAdversarioLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelCartasAdversarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelCartasAdversarioLayout.createSequentialGroup()
                        .addComponent(labelMaoAdFam)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(labelQuantMaoAdFamilia))
                    .addGroup(panelCartasAdversarioLayout.createSequentialGroup()
                        .addComponent(labelCartasMaoAdLazer)
                        .addGap(18, 18, 18)
                        .addComponent(labelQuantMaoAdLazer))
                    .addGroup(panelCartasAdversarioLayout.createSequentialGroup()
                        .addComponent(labelCartasMaoAdSust)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(labelQuantMaoAdSustentavel))
                    .addGroup(panelCartasAdversarioLayout.createSequentialGroup()
                        .addComponent(jLabel20)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(labelQuantMaoAdProfissao)))
                .addContainerGap(32, Short.MAX_VALUE))
        );
        panelCartasAdversarioLayout.setVerticalGroup(
            panelCartasAdversarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelCartasAdversarioLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelCartasAdversarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelMaoAdFam)
                    .addComponent(labelQuantMaoAdFamilia))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panelCartasAdversarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelCartasMaoAdLazer)
                    .addComponent(labelQuantMaoAdLazer))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panelCartasAdversarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelCartasMaoAdSust)
                    .addComponent(labelQuantMaoAdSustentavel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panelCartasAdversarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel20)
                    .addComponent(labelQuantMaoAdProfissao))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel1.setBackground(new java.awt.Color(255, 255, 255));

        cartasMaoAdLazer.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        cartasMaoAdLazer.setText("Atividade & Lazer: ");

        cartasAdmaoSustentavel.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        cartasAdmaoSustentavel.setText("Ações Sustentáveis:");

        cartasAdMaoFamilia.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        cartasAdMaoFamilia.setText("Cotiadino & Família: ");

        cartaAdMaoProfissao.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        cartaAdMaoProfissao.setText("Profissão & Carreira:");

        labelA.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        labelA.setText("A");

        labelB.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        labelB.setText("B");

        labelC.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        labelC.setText("C");

        labelD.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        labelD.setText("D");

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel2.setText("Total Pontuação");

        totalCartasAdAtividadeA.setText("0");

        totalCartasAdAtividadeB.setText("0");

        totalCartasAdAtividadeC.setText("0");

        totalCartasAdAtividadeD.setText("0");

        totalPontuacaoAdAtividade.setText("0");

        totalCartasAdSustentavelA.setText("0");

        totalCartasAdSustentavelB.setText("0");

        totalCartasAdSustentavelC.setText("0");

        totalCartasAdSustentavelD.setText("0");

        totalPontuacaoAdSustentavel.setText("0");

        totalCartasAdFamiliaA.setText("0");

        totalCartasAdFamiliaB.setText("0");

        totalCartasAdFamiliaC.setText("0");

        totalCartasAdFamiliaD.setText("0");

        totalCartasAdProfissaoA.setText("0");
        totalCartasAdProfissaoA.setToolTipText("");

        totalPontuacaoAdFamilia.setText("0");

        totalCartasAdProfissaoB.setText("0");

        totalCartasAdProfissaoC.setText("0");

        totalCartasAdProfissaoD.setText("0");

        totalPontuacaoAdProfissao.setText("0");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(cartasMaoAdLazer)
                            .addComponent(cartasAdmaoSustentavel)
                            .addComponent(cartasAdMaoFamilia))
                        .addGap(20, 20, 20)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(totalCartasAdSustentavelA)
                                        .addGap(18, 18, 18)
                                        .addComponent(totalCartasAdSustentavelB)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(totalCartasAdSustentavelC))
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(labelA)
                                        .addGap(18, 18, 18)
                                        .addComponent(labelB)
                                        .addGap(18, 18, 18)
                                        .addComponent(labelC))
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(totalCartasAdAtividadeA)
                                        .addGap(18, 18, 18)
                                        .addComponent(totalCartasAdAtividadeB)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(totalCartasAdAtividadeC, javax.swing.GroupLayout.PREFERRED_SIZE, 6, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addGap(18, 18, 18)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(labelD)
                                        .addGap(18, 18, 18)
                                        .addComponent(jLabel2))
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(totalCartasAdAtividadeD)
                                            .addComponent(totalCartasAdSustentavelD))
                                        .addGap(57, 57, 57)
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(totalPontuacaoAdSustentavel)
                                            .addComponent(totalPontuacaoAdAtividade)
                                            .addComponent(totalPontuacaoAdFamilia)
                                            .addComponent(totalPontuacaoAdProfissao)))))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addGap(24, 24, 24)
                                        .addComponent(totalCartasAdProfissaoC))
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                                        .addComponent(totalCartasAdFamiliaA)
                                        .addGap(18, 18, 18)
                                        .addComponent(totalCartasAdFamiliaB)
                                        .addGap(22, 22, 22)
                                        .addComponent(totalCartasAdFamiliaC)))
                                .addGap(18, 18, 18)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(totalCartasAdFamiliaD)
                                    .addComponent(totalCartasAdProfissaoD)))))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(cartaAdMaoProfissao)
                        .addGap(18, 18, 18)
                        .addComponent(totalCartasAdProfissaoA)
                        .addGap(18, 18, 18)
                        .addComponent(totalCartasAdProfissaoB)))
                .addContainerGap(18, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(17, 17, 17)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelA)
                    .addComponent(labelB)
                    .addComponent(labelC)
                    .addComponent(labelD)
                    .addComponent(jLabel2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cartasMaoAdLazer)
                    .addComponent(totalCartasAdAtividadeA)
                    .addComponent(totalCartasAdAtividadeB)
                    .addComponent(totalCartasAdAtividadeC)
                    .addComponent(totalCartasAdAtividadeD)
                    .addComponent(totalPontuacaoAdAtividade))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cartasAdmaoSustentavel)
                    .addComponent(totalCartasAdSustentavelA)
                    .addComponent(totalCartasAdSustentavelB)
                    .addComponent(totalCartasAdSustentavelC)
                    .addComponent(totalCartasAdSustentavelD)
                    .addComponent(totalPontuacaoAdSustentavel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cartasAdMaoFamilia)
                    .addComponent(totalCartasAdFamiliaA)
                    .addComponent(totalCartasAdFamiliaB)
                    .addComponent(totalCartasAdFamiliaC)
                    .addComponent(totalCartasAdFamiliaD)
                    .addComponent(totalPontuacaoAdFamilia))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 13, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cartaAdMaoProfissao)
                    .addComponent(totalCartasAdProfissaoA)
                    .addComponent(totalCartasAdProfissaoB)
                    .addComponent(totalCartasAdProfissaoC)
                    .addComponent(totalCartasAdProfissaoD)
                    .addComponent(totalPontuacaoAdProfissao))
                .addGap(25, 25, 25))
        );

        labelAguardando.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/ufsc/aps/jogodavida/view/ico_aguardando.gif"))); // NOI18N
        labelAguardando.setMaximumSize(new java.awt.Dimension(100, 100));
        labelAguardando.setMinimumSize(new java.awt.Dimension(100, 100));
        labelAguardando.setPreferredSize(new java.awt.Dimension(100, 100));

        labelStatus.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        labelStatus.setText("Status!");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(labelAguardando, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(labelStatus, javax.swing.GroupLayout.PREFERRED_SIZE, 273, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(10, 10, 10)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(panelCartasAdversario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(panelCartasMao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(buttonAtividade)
                                .addGap(18, 18, 18)
                                .addComponent(buttonSustentavel)
                                .addGap(18, 18, 18)
                                .addComponent(buttonFamilia)
                                .addGap(18, 18, 18)
                                .addComponent(buttonProfissao)
                                .addGap(0, 380, Short.MAX_VALUE)))
                        .addContainerGap())
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(panelVida, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(buttonPassarVez, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(155, 155, 155))))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(27, 27, 27)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(panelVida, javax.swing.GroupLayout.PREFERRED_SIZE, 353, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(panelCartasMao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(buttonPassarVez, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(15, 15, 15)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(buttonAtividade)
                    .addComponent(buttonSustentavel)
                    .addComponent(buttonFamilia)
                    .addComponent(buttonProfissao))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(labelAguardando, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(labelStatus, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(panelCartasAdversario, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void buttonPassarVezActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonPassarVezActionPerformed
        atorJogador.passarVez();
    }//GEN-LAST:event_buttonPassarVezActionPerformed

    private void buttonAtividadeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonAtividadeActionPerformed
        atorJogador.comprarCarta("LAZER");
    }//GEN-LAST:event_buttonAtividadeActionPerformed

    private void buttonSustentavelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSustentavelActionPerformed
        atorJogador.comprarCarta("SUSTENTAVEL");
    }//GEN-LAST:event_buttonSustentavelActionPerformed

    private void buttonFamiliaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonFamiliaActionPerformed
        atorJogador.comprarCarta("COTIDIANO");
    }//GEN-LAST:event_buttonFamiliaActionPerformed

    private void buttonProfissaoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonProfissaoActionPerformed
        atorJogador.comprarCarta("PROFISSAO");
    }//GEN-LAST:event_buttonProfissaoActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel a26;
    private javax.swing.JLabel a27;
    private javax.swing.JLabel a28;
    private javax.swing.JLabel a29;
    private javax.swing.JLabel a30;
    private javax.swing.JButton buttonAtividade;
    private javax.swing.JButton buttonFamilia;
    private javax.swing.JButton buttonPassarVez;
    private javax.swing.JButton buttonProfissao;
    private javax.swing.JButton buttonSustentavel;
    private javax.swing.JLabel cartaAdMaoProfissao;
    private javax.swing.JLabel cartasAdMaoFamilia;
    private javax.swing.JLabel cartasAdmaoSustentavel;
    private javax.swing.JLabel cartasMaoAdLazer;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JLabel labelA;
    private javax.swing.JLabel labelAcao;
    private javax.swing.JLabel labelAguardando;
    private javax.swing.JLabel labelAtividade;
    private javax.swing.JLabel labelB;
    private javax.swing.JLabel labelC;
    private javax.swing.JLabel labelCartasMaoAdLazer;
    private javax.swing.JLabel labelCartasMaoAdSust;
    private javax.swing.JLabel labelD;
    private javax.swing.JLabel labelFamilia;
    private javax.swing.JLabel labelMaoAdFam;
    private javax.swing.JLabel labelProfissao;
    private javax.swing.JLabel labelQuantMaoAdFamilia;
    private javax.swing.JLabel labelQuantMaoAdLazer;
    private javax.swing.JLabel labelQuantMaoAdProfissao;
    private javax.swing.JLabel labelQuantMaoAdSustentavel;
    private javax.swing.JLabel labelStatus;
    private javax.swing.JPanel panelAtividade;
    private javax.swing.JPanel panelAtividadeA;
    private javax.swing.JPanel panelAtividadeB;
    private javax.swing.JPanel panelAtividadeC;
    private javax.swing.JPanel panelAtividadeD;
    private javax.swing.JPanel panelCartasAdversario;
    private javax.swing.JPanel panelCartasMao;
    private javax.swing.JPanel panelFamilia;
    private javax.swing.JPanel panelFamiliaA;
    private javax.swing.JPanel panelFamiliaB;
    private javax.swing.JPanel panelFamiliaC;
    private javax.swing.JPanel panelFamiliaD;
    private javax.swing.JPanel panelProfissao;
    private javax.swing.JPanel panelProfissaoA;
    private javax.swing.JPanel panelProfissaoB;
    private javax.swing.JPanel panelProfissaoC;
    private javax.swing.JPanel panelProfissaoD;
    private javax.swing.JPanel panelSustentavel;
    private javax.swing.JPanel panelSustentavelA;
    private javax.swing.JPanel panelSustentavelB;
    private javax.swing.JPanel panelSustentavelC;
    private javax.swing.JPanel panelSustentavelD;
    private javax.swing.JPanel panelVida;
    private javax.swing.JLabel totalCartasAdAtividadeA;
    private javax.swing.JLabel totalCartasAdAtividadeB;
    private javax.swing.JLabel totalCartasAdAtividadeC;
    private javax.swing.JLabel totalCartasAdAtividadeD;
    private javax.swing.JLabel totalCartasAdFamiliaA;
    private javax.swing.JLabel totalCartasAdFamiliaB;
    private javax.swing.JLabel totalCartasAdFamiliaC;
    private javax.swing.JLabel totalCartasAdFamiliaD;
    private javax.swing.JLabel totalCartasAdProfissaoA;
    private javax.swing.JLabel totalCartasAdProfissaoB;
    private javax.swing.JLabel totalCartasAdProfissaoC;
    private javax.swing.JLabel totalCartasAdProfissaoD;
    private javax.swing.JLabel totalCartasAdSustentavelA;
    private javax.swing.JLabel totalCartasAdSustentavelB;
    private javax.swing.JLabel totalCartasAdSustentavelC;
    private javax.swing.JLabel totalCartasAdSustentavelD;
    private javax.swing.JLabel totalPontuacaoAdAtividade;
    private javax.swing.JLabel totalPontuacaoAdFamilia;
    private javax.swing.JLabel totalPontuacaoAdProfissao;
    private javax.swing.JLabel totalPontuacaoAdSustentavel;
    // End of variables declaration//GEN-END:variables

    @Override
    public void waitFinished() {
    }

    @Override
    public void connectionLost(String msg) {
        base.changePanels("Connect");
    }
    
    public Frame getParentFrame() {
        return base;
    }

    public void montar() {
        Tabuleiro meuTabuleiro = atorJogador.getMeuTabuleiro();
        resetarComponentes();
        if (meuTabuleiro.getJ1().isDaVez()) {
            labelAguardando.setVisible(false);
            labelStatus.setText("Faça sua jogada!");
        } else {
            labelAguardando.setVisible(true);
            labelStatus.setText("Aguardando Oponente..");
        }
        
        if (meuTabuleiro.getJ1().getCartasDaMao() != null) {
            panelCartasMao.setLayout(new GridLayout(2,3,8,8));
            for(Carta carta : meuTabuleiro.getJ1().getCartasDaMao()) {
                LabelCarta lc = new LabelCarta(carta,true);
                if(carta.getPontuacao() < 0) {
                    lc.addMouseListener(createMouseListenerCartaNegativa(lc));
                }
                else if(carta.getPontuacao() == 0 && carta.getDescricao().equals("Coringa")) {
                    lc.addMouseListener(createMouseListenerAdicionaCartaCoringa(lc));
                }
                else {
                    lc.addMouseListener(createMouseListenerAdicionaCarta(lc));
                }
                panelCartasMao.add(lc);
            }
        }
        
        for(Conjunto c : meuTabuleiro.getJ1().getConjuntos()) {
            if(c.getTipo() == TipoConjunto.LAZER) {
                if(c.getCartasDoConjunto() != null) {
                    for(Carta carta : c.getCartasDoConjunto()) {
                        LabelCarta lc = new LabelCarta(carta,false);
                        if(carta.getNaipe() == 'A') {
                            panelAtividadeA.setLayout(new FlowLayout());
                            panelAtividadeA.add(lc);
                        }
                        else if(carta.getNaipe() == 'B') {
                            panelAtividadeB.setLayout(new FlowLayout());
                            panelAtividadeB.add(lc);
                        }
                        else if(carta.getNaipe() == 'C') {
                            panelAtividadeC.setLayout(new FlowLayout());
                            panelAtividadeC.add(lc);
                        }
                        else {
                            panelAtividadeD.setLayout(new FlowLayout());
                            panelAtividadeD.add(lc);
                        }
                    }
                }
            }
            else if(c.getTipo() == TipoConjunto.SUSTENTAVEL) {
                if(c.getCartasDoConjunto() != null) {
                    for(Carta carta : c.getCartasDoConjunto()) {
                        LabelCarta lc = new LabelCarta(carta,false);
                        if(carta.getNaipe() == 'A') {
                            panelSustentavelA.setLayout(new FlowLayout());
                            panelSustentavelA.add(lc);
                        } 
                        else if(carta.getNaipe() == 'B') {
                            panelSustentavelB.setLayout(new FlowLayout());
                            panelSustentavelB.add(lc);
                        }
                        else if(carta.getNaipe() == 'C') {
                            panelSustentavelC.setLayout(new FlowLayout());
                            panelSustentavelC.add(lc);
                        }
                        else {
                            panelSustentavelD.setLayout(new FlowLayout());
                            panelSustentavelD.add(lc);
                        }
                    }
                }
            }
            else if(c.getTipo() == TipoConjunto.FAMILIA) {
                if(c.getCartasDoConjunto() != null) {
                    for(Carta carta : c.getCartasDoConjunto()) {
                        LabelCarta lc = new LabelCarta(carta,false);
                        if(carta.getNaipe() == 'A') {
                            panelFamiliaA.setLayout(new FlowLayout());
                            panelFamiliaA.add(lc);
                        }
                        else if(carta.getNaipe() == 'B') {
                            panelFamiliaB.setLayout(new FlowLayout());
                            panelFamiliaB.add(lc);
                        }
                        else if(carta.getNaipe() == 'C') {
                            panelFamiliaC.setLayout(new FlowLayout());
                            panelFamiliaC.add(lc);
                        }
                        else {
                            panelFamiliaD.setLayout(new FlowLayout());
                            panelFamiliaD.add(lc);
                        }
                    }
                }
            }
            else {
                if(c.getCartasDoConjunto() != null) {
                    for(Carta carta : c.getCartasDoConjunto()) {
                        LabelCarta lc = new LabelCarta(carta,false);
                        if(carta.getNaipe() == 'A') {
                            panelProfissaoA.setLayout(new FlowLayout());
                            panelProfissaoA.add(lc);
                        }
                        else if(carta.getNaipe() == 'B') {
                            panelProfissaoB.setLayout(new FlowLayout());
                            panelProfissaoB.add(lc);
                        }
                        else if(carta.getNaipe() == 'C') {
                            panelProfissaoC.setLayout(new FlowLayout());
                            panelProfissaoC.add(lc);
                        }
                        else {
                            panelProfissaoD.setLayout(new FlowLayout());
                            panelProfissaoD.add(lc);
                        }
                    }
                }
            }
        }
        
        panelCartasAdversario.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Cartas Adversário (" + meuTabuleiro.getJ2().getNome() + ")", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(153, 153, 153)));
        
        totalPontuacaoAdAtividade.setText(meuTabuleiro.getJ2().pontuacaoPorTipoConjunto(TipoConjunto.LAZER)+"");
        totalPontuacaoAdFamilia.setText(meuTabuleiro.getJ2().pontuacaoPorTipoConjunto(TipoConjunto.FAMILIA)+"");
        totalPontuacaoAdProfissao.setText(meuTabuleiro.getJ2().pontuacaoPorTipoConjunto(TipoConjunto.PROFISSAO)+"");
        totalPontuacaoAdSustentavel.setText(meuTabuleiro.getJ2().pontuacaoPorTipoConjunto(TipoConjunto.SUSTENTAVEL)+"");
       
        totalCartasAdAtividadeA.setText(meuTabuleiro.getJ2().pontuacaoPorConjunto(TipoConjunto.LAZER,'A')+"");
        totalCartasAdAtividadeB.setText(meuTabuleiro.getJ2().pontuacaoPorConjunto(TipoConjunto.LAZER,'B')+"");
        totalCartasAdAtividadeC.setText(meuTabuleiro.getJ2().pontuacaoPorConjunto(TipoConjunto.LAZER,'C')+"");
        totalCartasAdAtividadeD.setText(meuTabuleiro.getJ2().pontuacaoPorConjunto(TipoConjunto.LAZER,'D')+"");
        totalCartasAdFamiliaA.setText(meuTabuleiro.getJ2().pontuacaoPorConjunto(TipoConjunto.FAMILIA,'A')+"");
        totalCartasAdFamiliaB.setText(meuTabuleiro.getJ2().pontuacaoPorConjunto(TipoConjunto.FAMILIA,'B')+"");
        totalCartasAdFamiliaC.setText(meuTabuleiro.getJ2().pontuacaoPorConjunto(TipoConjunto.FAMILIA,'C')+"");
        totalCartasAdFamiliaD.setText(meuTabuleiro.getJ2().pontuacaoPorConjunto(TipoConjunto.FAMILIA,'D')+"");
        totalCartasAdProfissaoA.setText(meuTabuleiro.getJ2().pontuacaoPorConjunto(TipoConjunto.PROFISSAO,'A')+"");
        totalCartasAdProfissaoB.setText(meuTabuleiro.getJ2().pontuacaoPorConjunto(TipoConjunto.PROFISSAO,'B')+"");
        totalCartasAdProfissaoC.setText(meuTabuleiro.getJ2().pontuacaoPorConjunto(TipoConjunto.PROFISSAO,'C')+"");
        totalCartasAdProfissaoD.setText(meuTabuleiro.getJ2().pontuacaoPorConjunto(TipoConjunto.PROFISSAO,'D')+"");
        totalCartasAdSustentavelA.setText(meuTabuleiro.getJ2().pontuacaoPorConjunto(TipoConjunto.SUSTENTAVEL,'A')+"");
        totalCartasAdSustentavelB.setText(meuTabuleiro.getJ2().pontuacaoPorConjunto(TipoConjunto.SUSTENTAVEL,'B')+"");
        totalCartasAdSustentavelC.setText(meuTabuleiro.getJ2().pontuacaoPorConjunto(TipoConjunto.SUSTENTAVEL,'C')+"");
        totalCartasAdSustentavelD.setText(meuTabuleiro.getJ2().pontuacaoPorConjunto(TipoConjunto.SUSTENTAVEL,'D')+"");
            
        if (meuTabuleiro.getJ2().getCartasDaMao() != null) {
            int quantCartasOpFam = 0 , quantCartasOpLaz = 0, quantCartasOpSust = 0, quantCartasOpProf = 0;
            for(Carta carta : meuTabuleiro.getJ2().getCartasDaMao()) {
                if(carta.getTipoConjunto().equals(TipoConjunto.FAMILIA)) {
                    quantCartasOpFam++;
                }
                else if(carta.getTipoConjunto().equals(TipoConjunto.LAZER)) {
                    quantCartasOpLaz++;
                }
                else if(carta.getTipoConjunto().equals(TipoConjunto.SUSTENTAVEL)) {
                    quantCartasOpSust++;
                }
                else {
                    quantCartasOpProf++;
                }
            }
            labelQuantMaoAdFamilia.setText(quantCartasOpFam+"");
            labelQuantMaoAdLazer.setText(quantCartasOpLaz+"");
            labelQuantMaoAdProfissao.setText(quantCartasOpProf+"");
            labelQuantMaoAdSustentavel.setText(quantCartasOpSust+"");
        }
        this.revalidate();
    }
    
    private MouseListener createMouseListenerAdicionaCarta(final LabelCarta lc) {
        return new MouseAdapter() {
            
            @Override
            public void mouseClicked(MouseEvent e) {
                int resposta = JOptionPane.showConfirmDialog(null,"Tem certeza que quer colocar esta carta na mesa?","CONFIRMAR",JOptionPane.OK_CANCEL_OPTION);
                if(resposta == JOptionPane.YES_OPTION) {
                    atorJogador.adicionarCarta(lc.getCarta());
                }
            }
            
        };
    }
    
    private MouseListener createMouseListenerAdicionaCartaCoringa(final LabelCarta lc) {
        return new MouseAdapter() {
            
            @Override
            public void mouseClicked(MouseEvent e) {
                char naipe = solicitarDialogCartaCoringa();
                lc.getCarta().setNaipe(naipe);
                atorJogador.adicionarCarta(lc.getCarta());
            }
            
        };
    }
    
    private MouseListener createMouseListenerCartaNegativa(final LabelCarta lc) {
        return new MouseAdapter() {
            
            @Override
            public void mouseClicked(MouseEvent e) {
                if(atorJogador.getMeuTabuleiro().verificarSePodePagarCartaNegativa()) {
                    exibirMensagem("Você vai escolher agora qual carta positiva vai sacar a negativa",JOptionPane.INFORMATION_MESSAGE);
                    exibirDialogCartaNegativa(lc.getCarta());
                }
                else {
                    exibirMensagem("Você não possui cartas positivas com saldo para pagar esta negativa!",JOptionPane.ERROR_MESSAGE);
                }
            }
            
        };
    }

    public void exibirMensagem(String ret, int optionPaneMessageType) {
        JOptionPane.showMessageDialog(this, ret, "MENSAGEM", optionPaneMessageType);
    }
    
    public void exibirDialogCartaNegativa(final Carta cartaNegativa) {
        DialogCartaNegativa dialog = new DialogCartaNegativa(this, true, atorJogador.getMeuTabuleiro().getJ1().getCartasDaMao(), cartaNegativa);
        dialog.setVisible(true);
    }
    
    public char solicitarDialogCartaCoringa() {
        DialogCartaCoringa dialog = new DialogCartaCoringa(this, true);
        dialog.setVisible(true);
        return dialog.getNaipeEscolhido();
    }
    
    public void mostrarResultadoFinal(boolean souVencedor) {
        if (souVencedor) {
            this.exibirMensagem("Parabéns! Você venceu esta partida.", JOptionPane.INFORMATION_MESSAGE);
        } else {
            this.exibirMensagem("Não foi dessa vez! Você perdeu esta partida.\nTente outra vez!", JOptionPane.INFORMATION_MESSAGE);
        }
        atorJogador.finalizarPartida();
        base.changePanels("Connect");
    }

    public void avisoEnchente() {
        this.exibirMensagem("Seu oponente sacou a carta enchente, com isso você perdeu todas as cartas da mão!", JOptionPane.INFORMATION_MESSAGE);
    }
    
    public void pagarCartaNegativa(Carta cartaPositiva, Carta cartaNegativa) {
        atorJogador.pagarCartaNegativa(cartaPositiva, cartaNegativa);
    }
    
    public void resetarComponentes() {
        Component[] cs = panelCartasMao.getComponents();
        for (Component c : cs) {
            if (c instanceof JLabel) {
                panelCartasMao.remove(c);
            }
        }
        panelAtividadeA.removeAll();
        panelAtividadeB.removeAll();
        panelAtividadeC.removeAll();
        panelAtividadeD.removeAll();
        panelSustentavelA.removeAll();
        panelSustentavelB.removeAll();
        panelSustentavelC.removeAll();
        panelSustentavelD.removeAll();
        panelFamiliaA.removeAll();
        panelFamiliaB.removeAll();
        panelFamiliaC.removeAll();
        panelFamiliaD.removeAll();
        panelProfissaoA.removeAll();
        panelProfissaoB.removeAll();
        panelProfissaoC.removeAll();
        panelProfissaoD.removeAll();
    }

}
